package com.wgchao.authmanager.infrastructure.jpa.repository;

import com.wgchao.authmanager.infrastructure.jpa.entity.AgencyInfo;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AgencyInfoJpaRepository extends JpaRepository<AgencyInfo, Long>, JpaSpecificationExecutor<AgencyInfo> {

    AgencyInfo findFirstByAgencyCodeAndDelFalse(String agencyCode);

    AgencyInfo findFirstByAgencyCode(String agencyCode);

    List<AgencyInfo> findAll(Specification specification);
}
